package main

import "fmt"

type Person struct {
	name string
}

func (person *Person) test() {
	fmt.Printf("test--> %p\n", person)            // 0xc000010230
	fmt.Printf("test--> %p\n", &person)           // 0xc00000e028
	fmt.Printf("test--> %p\n", &((*person).name)) // 0xc000010230
	fmt.Printf("test--> %p\n", &(person.name))    // 0xc000010230
}

func main() {
	person := Person{"jack"}
	(&person).test()
	fmt.Printf("main person addr is %p\n", &person) // 0xc000010230
}
